<template>
  <div>
    <el-dialog
      title="提示"
      :visible.sync="dialogVisible"
      width="30%"
      :before-close="handleClose"
    >
      <span>您确认删除吗</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="confirmDel">删 除</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>

export default {
  name: "DelDialog",
  props: {
    delDialogVisible: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      dialogVisible: false
    };
  },
  created() {
    this.dialogVisible = this.delDialogVisible
  },
  methods: {
    confirmDel() {
      this.$emit('confirmDel')
      this.dialogVisible = false
    }
  }
};
</script>

<style scoped lang="scss"></style>
